package com.soriya.nestlive.util.excpetion;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

@EqualsAndHashCode(callSuper = true)
@Data
@AllArgsConstructor
@NoArgsConstructor
public class MyException extends RuntimeException {

    private int code = 500;
    private String msg = "系统错误";

    public MyException(String msg) {
        this.msg = msg;
    }

    @Override
    public String toString() {
        return "EnjoyException{" +
                "message=" + this.getMessage() +
                ", code=" + code +
                '}';
    }

}
